package example;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
import org.springframework.web.bind.annotation.*;

import java.util.UUID;

@RestController
public class BController {
    private static final Logger logger = LoggerFactory.getLogger(BController.class);

    @GetMapping("/y")
    public Object y() throws Exception{
//        String requestId= UUID.randomUUID().toString();
//        try {
//            MDC.put("Request-Id",requestId);
            logger.info(" step1 ");

            Thread.sleep(2000);

            logger.info(" step2 ");
//        } finally {
//            MDC.clear();
//        }
        return "ok";
    }
}